<template>
  <div>
    <div class="title">周末去哪儿</div>
    <ul>
      <li class="item" v-for="item in list" :key="item.id">
        <div class="item__img">
          <img :src="item.imgUrl" :alt="item.id" class="item__img__content" />
        </div>
        <div class="item__info">
          <p class="item__info__title">{{ item.title }}</p>
          <p class="item__info__desc">{{ item.desc }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "HomeWeekend",
  props: {
    list: Array,
  },
};
</script>

<style lang="scss" scoped>
@import "~../../../../assets/style/minixs.scss";
.title {
  height: 0.7rem;
  line-height: 0.7rem;
  font-size: 0.3rem;
  font-weight: bold;
  background: #eee;
  // 文本缩进
  text-indent: 0.2rem;
}
.item {
  &__img {
    overflow: hidden;
    height: 0;
    padding-bottom: 37%;
    &__content {
      width: 100%;
    }
  }
  &__info {
    padding: 0.1rem;
    &__title {
      line-height: 0.54rem;
      font-size: 0.3rem;
      font-weight: bold;
      @include ellipsis();
    }
    &__desc {
      line-height: 0.44rem;
      color: #ccc;
      @include ellipsis();
    }
  }
}
</style>